# -*- coding: utf-8 -*-

import logging

data_path = './data/'

corpus_file = {
    'ug': data_path + 'goods_corpus_ug.txt',
    'zh': data_path + 'goods_corpus_zh.txt',
}

vocab_file = {
    'ug': data_path + 'vocabulary_ug.txt',
    'zh': data_path + 'vocabulary_zh.txt',
}

model_path = './model/'
fasttext_path = model_path + 'fastText/'

# fasttext_model_file = {
#     'ug': fasttext_path + 'cc.ug.300.bin',
#     'zh': fasttext_path + 'cc.zh.300.bin',
# }

fasttext_model_file = {
    'ug': '../dataset/fastText/cc.ug.300.bin',
    'zh': '../dataset/fastText/cc.zh.300.bin',
}

model_save_file = {
    'ug': model_path + 'query_ug.model',
    'zh': model_path + 'query_zh.model',
}

fasttext_model_url = {
    'ug': 'https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.ug.300.bin.gz',
    'zh': 'https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.zh.300.bin.gz',
}

table_path = './table/'

table_save_file = {
    'ug': 'query_ug.csv',
    'zh': 'query_zh.csv',
}

result_path = './result/'

input_file = {
    'ug': result_path + 'input_ug.txt',
    'zh': result_path + 'input_zh.txt',
}

result_save_file = {
    'ug': result_path + 'result_ug.csv',
    'zh': result_path + 'result_zh.csv',
}


def init_logger():
    logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s -   %(message)s',
                        datefmt='%m/%d/%Y %H:%M:%S',
                        level=logging.INFO)

def get_args(parser):
    parser.add_argument("--lang", default="ug", type=str, choices=['zh', 'ug'],
                        help="Embedding languages. ['zh' - chinese, 'ug' - uyghur]")
    parser.add_argument("--fromPreTrainedModel", default='fasttext', type=str,
                        choices=['fasttext', 'tencent', 'custom'],
                        help="Train start from pretrained fastText model.")
    parser.add_argument("--num_train_epochs", default=10, type=int,
                        help="Total number of training epochs to perform.")
    parser.add_argument("--exists_word", action="store_true", help="Whether to limit result on existing word.")
    parser.add_argument("--sim_ratio", default=0.8, type=float, help="Limit output similar ratio of result word.")
    parser.add_argument("--do_train", action="store_true", help="Whether to run training.")
    parser.add_argument("--do_eval", action="store_true", help="Whether to run eval on the test set.")
    parser.add_argument("--do_predict", action="store_true", help="Whether to run predict on the target set.")

    args = parser.parse_args()

    return args


if __name__ == '__main__':
    pass
